package com.lancoo.ccas52.service;

import com.lancoo.ccas52.pojo.response.basicPlatform.*;
import com.lancoo.ccas52.pojo.response.score.Retake;
import com.lancoo.ccas52.pojo.vo.MsgCoursePlanExamine;
import com.lancoo.ccas52.pojo.vo.MsgTimeAdjustment;
import com.lancoo.ccas52.util.ResponseObject;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @ClassName YunBasicService
 * @Description 提供基础平台的服务
 * @Author quin
 * @Date 2022/12/29 16:03
 */
public interface YunBasicService {


    void syncTeacher(Integer taskId, String schoolId, String term);

    void syncStudent(Integer taskId, String schoolId, List<String> gradeList);

    /**
     * 同步教室
     *
     * @param taskId
     * @param schoolId
     * @return
     */
    String syncRoom(Integer taskId, String schoolId, String term);

    /**
     * 同步教学计划  专业  课程 环节 学生
     *
     * @param taskId
     * @param schoolId
     * @param term
     * @return
     */
    String syncPlanTeaching(Integer taskId, String schoolId, String term, List<String> gradeList);


    /**
     * 课表编排同步课表到基础平台
     *
     * @param taskId
     * @param userId
     * @param userName
     * @param schoolId
     * @return
     */
    ResponseObject syncAllScheduleToBasic(Integer taskId, String userId, String userName, String schoolId);

    /**
     * 在线选课同步课表到基础平台
     * @param taskId
     * @param userId
     * @param userName
     * @param schoolId
     * @return
     */
    ResponseObject syncOnlineScheduleToBasic(Integer taskId, String userId, String userName, String schoolId);

    /**
     * 同步重修学生
     *
     * @param taskId
     * @param schoolId
     * @param term
     */
    void syncRetakeStudent(Integer taskId, String schoolId, String term);

    /**
     * 获取免修学生
     *
     * @param taskId
     * @param schoolId
     * @param term
     * @return
     */
    List<Retake> getExemptStudent(Integer taskId, String schoolId, String term);

    /**
     * 获取课程库
     *
     * @param schoolId
     * @param term
     * @return
     */
    String syncCourse(Integer taskId, String schoolId, String term);

    /**
     * 获取环节库
     *
     * @param schoolId
     * @param term
     * @return
     */
    String syncSegment(Integer taskId, String schoolId, String term);

    /**
     * 同步年级专业
     *
     * @param taskId
     * @param schoolId
     * @param gradeList
     */
    void syncMajor(Integer taskId, String schoolId, String term, List<String> gradeList);

    /**
     * 获取全部学院信息 包括专业 年级 管理员信息
     *
     * @param taskId
     * @param schoolId
     * @return
     */
    List<BaseCollege> getCollege(Integer taskId, String schoolId);


    /**
     * 获取学期信息
     *
     * @param schoolId
     * @return
     */
    List<TermBasicInfo> getAllTermInfo(String schoolId);

    /**
     * 获取当前学期
     *
     * @param schoolId
     * @return
     */
    CurrentTermInfo GetCurrentTermInfo(String schoolId);

    /**
     * 获取基础平台年级
     *
     * @param schoolId
     * @return
     */
    List<BaseGrade> getGrade(String schoolId);

    /**
     * 获取用户信息
     *
     * @param userId
     * @return
     */
    UserInfo getUserInfo(String userId);

    List<IdentifyType> getIdentityTypeByUserID(String userId, String token);

    UserInfo getUserInfoByToken(String token);

    UserInfo getUserInfoByToken(String token, Integer taskId);

    Integer logout(String userId, String token);

    /**
     * 获取加密锁信息
     *
     * @param schoolId
     * @return
     */
    LockerInfo getSubSystemLockerInfoByID(String schoolId);

    /**
     * 代理前端的跨域请求
     *
     * @param url
     * @return
     */
    String proxyRequest(String url);

    /**
     * 转发带token的请求
     *
     * @param url
     * @param token
     * @return
     */
    String proxyRequest2(String url, String token);

    /**
     * 获取子系统地址，优先获取内网地址
     *
     * @param sysIDs
     * @param isInner true获取内网地址 false获取外网地址
     * @return
     */
    SubSystemsMainServer getSubSystemsMainServer(String sysIDs,Boolean isInner);

    /**
     * Get base platform course period scheme
     *
     * @return
     */
    void syncPeriodScheme(Integer taskId, Integer weekSet, String schoolId, String term);

    /**
     * 发送日志消息
     *
     * @param schoolId
     * @param userId
     * @param userName
     * @param operationTerminal
     * @param operationType
     * @param operationContent
     */
    void uploadLog(String schoolId, String userId, String userName, String operationTerminal, String operationType, String operationContent, String taskId);

    /**
     * 开课计划开放申请提醒
     *
     * @param setBeginTime
     * @param setEndTime
     * @param taskId
     * @param userId
     * @param userName
     */
    void sendOpenCoursePlanApplyMsg(LocalDateTime setBeginTime, LocalDateTime setEndTime, Integer taskId, String userId, String userName);

    /**
     * 教学任务开放处理提醒
     *
     * @param setBeginTime
     * @param setEndTime
     * @param taskId
     * @param userId
     * @param userName
     */
    void sendOpenTeachTaskApplyMsg(LocalDateTime setBeginTime, LocalDateTime setEndTime, Integer taskId, String userId, String userName);

    /**
     * 选课开始提醒 学校通知
     *
     * @param setBeginTime
     * @param setEndTime
     * @param taskId
     * @param module
     * @param userId
     * @param userName
     * @param authorization
     */
    void sendSelectCourseStartMsg(LocalDateTime setBeginTime, LocalDateTime setEndTime, Integer taskId, String module, String userId, String userName, String authorization);

    /**
     * 选课结束提醒
     *
     * @param setEndTime
     * @param taskId
     * @param module
     */
    void sendSelectCourseEndMsg(LocalDateTime setEndTime, Integer taskId, String module, Integer roundId);

    /**
     * 取消开班
     *
     * @param teachingClassIds
     * @param taskId
     * @param userId
     * @param userName
     */
    void sendSelectCourseCancelMsg(List<Long> teachingClassIds, Integer taskId, String userId, String userName, String authorization);

    /**
     * 审核开课计划变更
     *
     * @param taskId
     */
    void sendCoursePlanExamineMsg(Integer taskId);

    /**
     * 开课计划变更审核
     *
     * @param msgCoursePlanExamine
     */
    void sendCoursePlanExamineResultMsg(MsgCoursePlanExamine msgCoursePlanExamine);

    /**
     * 处理时段调整
     *
     * @param msgTimeAdjustment
     */
    void sendTimeAdjustmentMsg(MsgTimeAdjustment msgTimeAdjustment);

    /**
     * 处理时段结束
     *
     * @param msgTimeAdjustment
     */
    void sendTimeAdjustmentEndMsg(MsgTimeAdjustment msgTimeAdjustment);

}
